import request from "@/router/axios";

// 获取用户列表
export const getList = (params) => {
  return request({
    url: "/api/admin/member/pagination",
    method: "get",
    params: { ...params },
  });
};

// 禁用 启用
export const setStatus = (params) => {
  return request({
    url: `/api/admin/member/setStatus/${params.id}`,
    method: "put",
    data: {
      status: params.status,
    },
  });
};

// 获取 用户详情 **************************

// 基础信息
export const getUserInfo = (id) => {
  return request({
    url: `/api/admin/member/baseInfo/${id}`,
    method: "get",
  });
};

// 推广成员
export const getPromoterList = (params) => {
  return request({
    url: `/api/admin/member/promotionMember/${params.id}`,
    method: "get",
  });
};

// 删除用户
export const deleteUser = (id) => {
  return request({
    url: `/api/admin/member/delete/${id}`,
    method: "delete",
  });
};



